var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, false, true);
            cm.inGameDirectionEvent_SetAdditionalEffectVisibleForInGameDirection2();
            cm.fieldEffect_InsertCanvas(1, 255, 0, 0, 0, 0, 0);
            cm.setStandAloneMode(true);
            cm.inGameDirectionEvent_AskAnswerTime(1000);
            cm.curNodeEventEnd(true)
        } else {
            if (status === a++) {
                cm.fieldEffect_PlayBGM("Bgm53/SanctuaryOfMitra", 0, 0);
                cm.inGameDirectionEvent_AskAnswerTime(2500)
            } else {
                if (status === a++) {
                    cm.inGameDirectionEvent_Monologue("英勇的骑士啊。", 0);
                    cm.effect_Voice("Voice5.img/CH3/1_1", 128)
                } else {
                    if (status === a++) {
                        cm.inGameDirectionEvent_Monologue("愿你成为驱散黑暗的黎明之剑。", 0);
                        cm.effect_Voice("Voice5.img/CH3/1_2", 128)
                    } else {
                        if (status === a++) {
                            cm.inGameDirectionEvent_Monologue("愿你成为守护战友的朝晖之盾。", 0);
                            cm.effect_Voice("Voice5.img/CH3/1_3", 128)
                        } else {
                            if (status === a++) {
                                cm.inGameDirectionEvent_Monologue("愿你成为严惩敌人的黄昏之焰。", 1);
                                cm.effect_Voice("Voice5.img/CH3/1_4", 128)
                            } else {
                                if (status === a++) {
                                    cm.inGameDirectionEvent_AskAnswerTime(1000)
                                } else {
                                    if (status === a++) {
                                        cm.fieldEffect_ProcessOnOffLayer("BlackOut3", "Map/Effect2.img/BlackOut", 0, 50, 0, 0, 0, 4, 1, 0, 0, -1, 0);
                                        cm.fieldEffect_复合图片动画(["Effect/Direction23.img/spine/5/skeleton", "animation", "", "knight"], [0, 1, 0, 90000, 0, 0, -1, 1]);
                                        cm.fieldEffect_ProcessOnOffLayer("BlackOut3", "", 2, 1500, 0, 0, 0, 0, 0, 0, 0, 0, 0);
                                        cm.inGameDirectionEvent_AskAnswerTime(3500)
                                    } else {
                                        if (status === a++) {
                                            cm.inGameDirectionEvent_Monologue("起身吧。", 0);
                                            cm.effect_Voice("Voice5.img/CH3/1_5", 128)
                                        } else {
                                            if (status === a++) {
                                                cm.inGameDirectionEvent_Monologue("从现在起，你就是密特拉之剑。", 1);
                                                cm.effect_Voice("Voice5.img/CH3/1_6", 128)
                                            } else {
                                                if (status === a++) {
                                                    cm.inGameDirectionEvent_AskAnswerTime(2500)
                                                } else {
                                                    if (status === a++) {
                                                        cm.fieldEffect_取消复合图片动画("knight", 1, 700);
                                                        cm.inGameDirectionEvent_AskAnswerTime(1000)
                                                    } else {
                                                        if (status === a++) {
                                                            cm.inGameDirectionEvent_Monologue("你需坚信，长夜即将迎来尽头。", 0);
                                                            cm.effect_Voice("Voice5.img/CH3/1_7", 128)
                                                        } else {
                                                            if (status === a++) {
                                                                cm.inGameDirectionEvent_Monologue("赤日会点燃东方的天空，冉冉升起……", 0);
                                                                cm.effect_Voice("Voice5.img/CH3/1_8", 128)
                                                            } else {
                                                                if (status === a++) {
                                                                    cm.inGameDirectionEvent_Monologue("", 1)
                                                                } else {
                                                                    if (status === a++) {
                                                                        cm.inGameDirectionEvent_AskAnswerTime(1000)
                                                                    } else {
                                                                        if (status === a++) {
                                                                            cm.fieldEffect_Hero9(0, 3000);
                                                                            cm.inGameDirectionEvent_AskAnswerTime(3000)
                                                                        } else {
                                                                            if (status === a++) {
                                                                                cm.fieldEffect_PlayBGM("Bgm00/Silence", 0, 0);
                                                                                cm.inGameDirectionEvent_AskAnswerTime(300)
                                                                            } else {
                                                                                if (status === a++) {
                                                                                    cm.sendNormalTalk_Bottom("#face4#东方的天空……燃烧……", 37, 3004430, false, true)
                                                                                } else {
                                                                                    if (status === a++) {
                                                                                        cm.fieldEffect_Hero9(100, 100);
                                                                                        cm.inGameDirectionEvent_AskAnswerTime(1000)
                                                                                    } else {
                                                                                        if (status === a++) {
                                                                                            cm.fieldEffect_PlayBGM("Bgm53/Apostles", 0, 0);
                                                                                            cm.fieldEffect_ProcessOnOffLayer("BlackOut", "Map/Effect2.img/BlackOut", 0, 50, 0, 0, 0, 4, 1, 0, 0, -1, 0);
                                                                                            cm.inGameDirectionEvent_AskAnswerTime(2000)
                                                                                        } else {
                                                                                            if (status === a++) {
                                                                                                cm.fieldEffect_复合图片动画(["Effect/Direction23.img/spine/3/BurnningSky_00", "animation", "", "bubble"], [0, 1, 0, 90000, 0, 0, -1, 1]);
                                                                                                cm.fieldEffect_PlayFieldSound("Sound/SoundEff.img/cernium3/burningSky", 100);
                                                                                                cm.fieldEffect_ProcessOnOffLayer("BlackOut", "", 2, 1500, 0, 0, 0, 0, 0, 0, 0, 0, 0);
                                                                                                cm.inGameDirectionEvent_AskAnswerTime(4000)
                                                                                            } else {
                                                                                                if (status === a++) {
                                                                                                    cm.sendNormalTalk_Bottom("#face4#近天峰……", 37, 3004430, false, true)
                                                                                                } else {
                                                                                                    if (status === a++) {
                                                                                                        cm.sendNormalTalk_Bottom("#face4#闪电……使徒……", 37, 3004430, true, true)
                                                                                                    } else {
                                                                                                        if (status === a++) {
                                                                                                            cm.inGameDirectionEvent_AskAnswerTime(5000)
                                                                                                        } else {
                                                                                                            if (status === a++) {
                                                                                                                cm.fieldEffect_ProcessOnOffLayer("BlackOut2", "Map/Effect2.img/BlackOut", 0, 500, 0, 0, 0, 4, 1, 0, 0, -1, 0);
                                                                                                                cm.fieldEffect_Hero9(0, 500);
                                                                                                                cm.inGameDirectionEvent_AskAnswerTime(500)
                                                                                                            } else {
                                                                                                                if (status === a++) {
                                                                                                                    cm.fieldEffect_PlayBGM("Bgm00/Silence", 0, 0);
                                                                                                                    cm.inGameDirectionEvent_AskAnswerTime(500)
                                                                                                                } else {
                                                                                                                    if (status === a++) {
                                                                                                                        cm.eventSKill(0);
                                                                                                                        cm.dispose();
                                                                                                                        cm.warp(993151001, 0, false)
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};